package com.reef.interceptor;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebConfiger implements WebMvcConfigurer{
	@Autowired
	private LoginInterceptor loginInterceptor;
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(loginInterceptor).addPathPatterns("/views/*.html").excludePathPatterns("/views/user/*login.html");
	}
	//静态资源的一些配置
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		//registry.addResourceHandler("/public/**").addResourceLocations("classpath:/public/");
		
	}

}
